%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@page import="javax.rmi.PortableRemoteObject"%>
<%@page import="uy.com.antel.ejb.interfaces.EditorialEjbLocal"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.HashMap"%>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="javax.naming.Context" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.Iterator" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Publicaciones</title>
</head>
<body>
<% 
Context ctx = new InitialContext();
EditorialEjbLocal miEjb = (EditorialEjbLocal) PortableRemoteObject.narrow(ctx.lookup("EditorialBean/local"), EditorialEjbLocal.class);
HashMap<String, ArrayList<String>> datosSalida = miEjb.mostrarPublicacionesPorEditorial();
Iterator it = datosSalida.entrySet().iterator();
Map.Entry e;


while (it.hasNext()) {
e = (Map.Entry)it.next();
out.println("Editorial: ");
out.println(e.getKey() + "<br/>");
ArrayList<String> ls = (ArrayList<String>)e.getValue();
Iterator itlist = ls.iterator();
out.println("Publicaciones : <br/>");
while (itlist.hasNext()){
out.println(itlist.next() + "<br/>");
}
//out.println("<br/>");
}	

%>
</body>
</html>